/*
* created by Administrator on 2018/12/12
* 好的代码像粥一样,是得用时间和精力熬的。
*/
const mongoose = require('mongoose');
let connect = (app) => {
    mongoose.connect('mongodb://localhost:27017/myApp')
        .then(() => app.listen(8080, () => {
                console.log('数据库连接成功');
                console.log('the server is running on port 8080');
            }
            )
        );
};
module.exports = connect;
